/**
 * @file main.cpp
 * @author yangx (yangxing2297@163.com)
 * @brief 测试服务器端代码
 * @version 0.1
 * @date 2023-04-12
 * 
 * @copyright Copyright (c) 2023
 * 
 */
#include <iostream>
#include <cstdint>
#include "TcpServer.h"


void CReadMsg(char *const msg, uint32_t len)
{
    std::cout << "Msg: " << msg << std::endl;
}

void CStatus(int status)
{
    std::cout << "Tcp: " << status << std::endl;
}



int main(int argc, char const *argv[])
{
    // CTcpClient *tcpClient = new CTcpClientImpl(CReadMsg, CStatus);
    // tcpClient->Connect("192.168.0.102", 8081);

    CTcpServer *tcpServer = new CTcpServer(8081);
    tcpServer->SetReadMsgCB(CReadMsg);
    tcpServer->SetStatusCB(CStatus);
    tcpServer->Run();

    return 0;
}
